package com.yonyou.cyxdms.basedata.service.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeDeserializer;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeSerializer;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * <p>
 * 配置表
 * </p>
 *
 * @author guorp1
 * @since 2018-11-12
 */

public class CarparamDTO extends BaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    /**
     * 来源id
     */
    private Long sourceId;
    /**
     * APP_ID
     */
    private String appId;
    /**
     * 名称
     */
    private String name;
    /**
     * 父名称
     */
    private String masterName;
    /**
     * 父id
     */
    private Integer masterId;
    /**
     * 品牌名称
     */
    private String brandName;
    /**
     * 品牌ID
     */
    private Integer brandId;
    /**
     * 车系名称
     */
    private String serialName;
    /**
     * 车系ID
     */
    private Long serialId;
    /**
     * 车龄
     */
    private Integer carYear;
    /**
     * 体形
     */
    private String bodyForm;
    /**
     * Is_Travel
     */
    private Integer isTravel;
    /**
     * 上市时间
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime marketTime;
    /**
     * 指导价格
     */
    private Double referPrice;
    /**
     * 销售状态
     */
    private Integer saleState;
    /**
     * 生产状态
     */
    private Integer produceState;
    /**
     * Hasfoucus_Pic
     */
    private Integer hasfoucusPic;
    /**
     * 默认待查
     */
    private Integer fuelType;
    /**
     * pic总数
     */
    private Integer picCount;
    /**
     * 经销商最低价
     */
    private Double dealerMinprice;
    /**
     * 经销商最高价
     */
    private Double dealerMaxprice;
    /**
     * Param_Config状态
     */
    private Integer paramConfigstate;
    /**
     * 访问量
     */
    private Integer pV;
    /**
     * 访问数
     */
    private Integer uV;
    /**
     * 编辑状态
     */
    private Integer editState;
    /**
     * level_id
     */
    private Integer levelId;
    /**
     * 数据来源
     */
    private Integer sourceChannel;
    /**
     * 车型ID
     */
    private Long modeId;
    /**
     * 车型代码
     */
    private String configCode;
    /**
     * 车型名称
     */
    private String configName;
    /**
     * 是  否  是否有效
     */
    private Integer isValid;
    /**
     * 当前时间
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime changeAt;
    /**
     * 是否加装
     */
    private String isRefit;
    /**
     * 排量
     */
    private String disPlacement;
    /**
     * 变速箱
     */
    private String transMission;
    /**
     * 配置级别
     */
    private String grade;
    /**
     * 车身
     */
    private String carBody;
    /**
     * 生效日期
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime enableDate;
    /**
     * 失效日期
     */
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime disableDate;
    /**
     * 燃料方式
     */
    private String fuelWay;
    /**
     * 模型code
     */
    private String modelCode;
    /**
     * 模型名称
     */
    private String modelName;
    /*
     *车型图片
     */
    private String carparamSinglePic;
    /*
     *车型详情图片
     */
    private String carparamPic;
    /**
     * 车型介绍
     */
    private String carparamIntroduce;

    public CarparamDTO() {
        super();
    }


    public Long getId() {
        return id;
    }


    public void setId(Long id) {
        this.id = id;
    }


    public Long getSourceId() {
        return sourceId;
    }


    public void setSourceId(Long sourceId) {
        this.sourceId = sourceId;
    }


    public String getAppId() {
        return appId;
    }


    public void setAppId(String appId) {
        this.appId = appId;
    }


    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }


    public String getMasterName() {
        return masterName;
    }


    public void setMasterName(String masterName) {
        this.masterName = masterName;
    }


    public Integer getMasterId() {
        return masterId;
    }


    public void setMasterId(Integer masterId) {
        this.masterId = masterId;
    }


    public String getBrandName() {
        return brandName;
    }


    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }


    public Integer getBrandId() {
        return brandId;
    }


    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }


    public String getSerialName() {
        return serialName;
    }


    public void setSerialName(String serialName) {
        this.serialName = serialName;
    }


    public Long getSerialId() {
        return serialId;
    }


    public void setSerialId(Long serialId) {
        this.serialId = serialId;
    }


    public Integer getCarYear() {
        return carYear;
    }


    public void setCarYear(Integer carYear) {
        this.carYear = carYear;
    }


    public String getBodyForm() {
        return bodyForm;
    }


    public void setBodyForm(String bodyForm) {
        this.bodyForm = bodyForm;
    }


    public Integer getIsTravel() {
        return isTravel;
    }


    public void setIsTravel(Integer isTravel) {
        this.isTravel = isTravel;
    }


    public LocalDateTime getMarketTime() {
        return marketTime;
    }


    public void setMarketTime(LocalDateTime marketTime) {
        this.marketTime = marketTime;
    }


    public Double getReferPrice() {
        return referPrice;
    }


    public void setReferPrice(Double referPrice) {
        this.referPrice = referPrice;
    }


    public Integer getSaleState() {
        return saleState;
    }


    public void setSaleState(Integer saleState) {
        this.saleState = saleState;
    }


    public Integer getProduceState() {
        return produceState;
    }


    public void setProduceState(Integer produceState) {
        this.produceState = produceState;
    }


    public Integer getHasfoucusPic() {
        return hasfoucusPic;
    }


    public void setHasfoucusPic(Integer hasfoucusPic) {
        this.hasfoucusPic = hasfoucusPic;
    }


    public Integer getFuelType() {
        return fuelType;
    }


    public void setFuelType(Integer fuelType) {
        this.fuelType = fuelType;
    }


    public Integer getPicCount() {
        return picCount;
    }


    public void setPicCount(Integer picCount) {
        this.picCount = picCount;
    }


    public Double getDealerMinprice() {
        return dealerMinprice;
    }


    public void setDealerMinprice(Double dealerMinprice) {
        this.dealerMinprice = dealerMinprice;
    }


    public Double getDealerMaxprice() {
        return dealerMaxprice;
    }


    public void setDealerMaxprice(Double dealerMaxprice) {
        this.dealerMaxprice = dealerMaxprice;
    }


    public Integer getParamConfigstate() {
        return paramConfigstate;
    }


    public void setParamConfigstate(Integer paramConfigstate) {
        this.paramConfigstate = paramConfigstate;
    }


    public Integer getpV() {
        return pV;
    }


    public void setpV(Integer pV) {
        this.pV = pV;
    }


    public Integer getuV() {
        return uV;
    }


    public void setuV(Integer uV) {
        this.uV = uV;
    }


    public Integer getEditState() {
        return editState;
    }


    public void setEditState(Integer editState) {
        this.editState = editState;
    }


    public Integer getLevelId() {
        return levelId;
    }


    public void setLevelId(Integer levelId) {
        this.levelId = levelId;
    }


    public Integer getSourceChannel() {
        return sourceChannel;
    }


    public void setSourceChannel(Integer sourceChannel) {
        this.sourceChannel = sourceChannel;
    }


    public Long getModeId() {
        return modeId;
    }


    public void setModeId(Long modeId) {
        this.modeId = modeId;
    }


    public String getConfigCode() {
        return configCode;
    }


    public void setConfigCode(String configCode) {
        this.configCode = configCode;
    }


    public String getConfigName() {
        return configName;
    }


    public void setConfigName(String configName) {
        this.configName = configName;
    }


    public Integer getIsValid() {
        return isValid;
    }


    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }


    public LocalDateTime getChangeAt() {
        return changeAt;
    }


    public void setChangeAt(LocalDateTime changeAt) {
        this.changeAt = changeAt;
    }


    public String getIsRefit() {
        return isRefit;
    }


    public void setIsRefit(String isRefit) {
        this.isRefit = isRefit;
    }


    public String getDisPlacement() {
        return disPlacement;
    }


    public void setDisPlacement(String disPlacement) {
        this.disPlacement = disPlacement;
    }


    public String getTransMission() {
        return transMission;
    }


    public void setTransMission(String transMission) {
        this.transMission = transMission;
    }


    public String getGrade() {
        return grade;
    }


    public void setGrade(String grade) {
        this.grade = grade;
    }


    public String getCarBody() {
        return carBody;
    }


    public void setCarBody(String carBody) {
        this.carBody = carBody;
    }


    public LocalDateTime getEnableDate() {
        return enableDate;
    }


    public void setEnableDate(LocalDateTime enableDate) {
        this.enableDate = enableDate;
    }


    public LocalDateTime getDisableDate() {
        return disableDate;
    }


    public void setDisableDate(LocalDateTime disableDate) {
        this.disableDate = disableDate;
    }


    public String getFuelWay() {
        return fuelWay;
    }


    public void setFuelWay(String fuelWay) {
        this.fuelWay = fuelWay;
    }


    public String getModelCode() {
        return modelCode;
    }


    public void setModelCode(String modelCode) {
        this.modelCode = modelCode;
    }


    public String getModelName() {
        return modelName;
    }


    public void setModelName(String modelName) {
        this.modelName = modelName;
    }


    public String getCarparamSinglePic() {
        return carparamSinglePic;
    }


    public void setCarparamSinglePic(String carparamSinglePic) {
        this.carparamSinglePic = carparamSinglePic;
    }

    public String getCarparamPic() {
        return carparamPic;
    }


    public void setCarparamPic(String carparamPic) {
        this.carparamPic = carparamPic;
    }

    public String getCarparamIntroduce() {
        return carparamIntroduce;
    }

    public void setCarparamIntroduce(String carparamIntroduce) {
        this.carparamIntroduce = carparamIntroduce;
    }

    @Override
    public String toString() {
        return "CarparamDTO{" +
                "id=" + id +
                ", sourceId=" + sourceId +
                ", appId=" + appId +
                ", name=" + name +
                ", masterName=" + masterName +
                ", masterId=" + masterId +
                ", brandName=" + brandName +
                ", brandId=" + brandId +
                ", serialName=" + serialName +
                ", serialId=" + serialId +
                ", carYear=" + carYear +
                ", bodyForm=" + bodyForm +
                ", isTravel=" + isTravel +
                ", marketTime=" + marketTime +
                ", referPrice=" + referPrice +
                ", saleState=" + saleState +
                ", produceState=" + produceState +
                ", hasfoucusPic=" + hasfoucusPic +
                ", fuelType=" + fuelType +
                ", picCount=" + picCount +
                ", dealerMinprice=" + dealerMinprice +
                ", dealerMaxprice=" + dealerMaxprice +
                ", paramConfigstate=" + paramConfigstate +
                ", pV=" + pV +
                ", uV=" + uV +
                ", editState=" + editState +
                ", levelId=" + levelId +
                ", sourceChannel=" + sourceChannel +
                ", modeId=" + modeId +
                ", configCode=" + configCode +
                ", configName=" + configName +
                ", isValid=" + isValid +
                ", changeAt=" + changeAt +
                ", isRefit=" + isRefit +
                ", disPlacement=" + disPlacement +
                ", transMission=" + transMission +
                ", grade=" + grade +
                ", carBody=" + carBody +
                ", enableDate=" + enableDate +
                ", disableDate=" + disableDate +
                ", fuelWay=" + fuelWay +
                ", modelCode=" + modelCode +
                ", modelName=" + modelName +
                ", carparamIntroduce=" + carparamIntroduce +
                "}";
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author guorp1
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author guorp1
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "id");
    }

}
